import request from '@/utils/request'
var qs = require('qs')
export function addAllMenu(params) {
  return request({
    url: '/tResources/save',
    method: 'post',
    data: qs.stringify(params)
  })
}
export function add(params) {
  return request({
    url: 'tResources/input',
    method: 'post',
    data: qs.stringify(params)
  })
}
export function searchMenu(params) {
  return request({
    url: '/tResources/list',
    method: 'post',
    data: qs.stringify(params)
  })
}
// export function queryAllAuth() {
//   return request({
//     url: '/role/queryAllAuth',
//     method: 'post'
//     // headers: { 'userToken': '1add399a6ae211e88576408d5c07f6f8' }
//   })
// }
export function MenuList(params) {
  return request({
    url: '/tResources/list',
    method: 'post',
    data: qs.stringify(params)
  })
}
export function delMenu(params) {
  return request({
    url: 'tResources/delete',
    method: 'post',
    data: qs.stringify(params)
  })
}
export function authRole(params) {
  return request({
    url: '/role/auth',
    method: 'post',
    data: qs.stringify(params)
  })
}
export function queryAllAuth(params) {
  return request({
    url: '/role/queryAllAuth',
    method: 'post',
    data: qs.stringify(params)
  })
}
export function queryroleAuth(data) {
  return request({
    url: '/role/queryById',
    method: 'post',
    data
  })
}
